home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / SunLabs / tclTK / src / tcl7.4 / Makefile.in < prev    next >
Encoding:
Makefile  |  1995-06-30  |  11.1 KB  |  347 lines

  1. #
  2. # This file is a Makefile for Tcl.  If it has the name "Makefile.in"
  3. # then it is a template for a Makefile;  to generate the actual Makefile,
  4. # run "./configure", which is a configuration script generated by the
  5. # "autoconf" program (constructs like "@foo@" will get replaced in the
  6. # actual Makefile.
  7. #
  8. # @(#) Makefile.in 1.23 95/06/08 13:13:36
  9.  
  10. # Current Tcl version;  used in various names.
  11.  
  12. VERSION = 7.4
  13.  
  14. #----------------------------------------------------------------
  15. # Things you can change to personalize the Makefile for your own
  16. # site (you can make these changes in either Makefile.in or
  17. # Makefile, but changes to Makefile will get lost if you re-run
  18. # the configuration script).
  19. #----------------------------------------------------------------
  20.  
  21. # Default top-level directories in which to install architecture-
  22. # specific files (exec_prefix) and machine-independent files such
  23. # as scripts (prefix).  The values specified here may be overridden
  24. # at configure-time with the --exec-prefix and --prefix options
  25. # to the "configure" script.
  26.  
  27. prefix =    @prefix@
  28. exec_prefix =    @exec_prefix@
  29.  
  30. # The following definition can be set to non-null for special systems
  31. # like AFS with replication.  It allows the pathnames used for installation
  32. # to be different than those used for actually reference files at
  33. # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
  34. # when installing files.
  35. INSTALL_ROOT =
  36.  
  37. # Directory from which applications will reference the library of Tcl
  38. # scripts (note: you can set the TCL_LIBRARY environment variable at
  39. # run-time to override this value):
  40. TCL_LIBRARY =    $(prefix)/lib/tcl$(VERSION)
  41.  
  42. # Path name to use when installing library scripts:
  43. SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(TCL_LIBRARY)
  44.  
  45. # Directory in which to install the archive libtcl.a:
  46. LIB_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/lib
  47.  
  48. # Directory in which to install the program tclsh:
  49. BIN_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/bin
  50.  
  51. # Directory in which to install the include file tcl.h:
  52. INCLUDE_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/include
  53.  
  54. # Top-level directory in which to install manual entries:
  55. MAN_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/man
  56.  
  57. # Directory in which to install manual entry for tclsh:
  58. MAN1_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man1
  59.  
  60. # Directory in which to install manual entries for Tcl's C library
  61. # procedures:
  62. MAN3_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man3
  63.  
  64. # Directory in which to install manual entries for the built-in
  65. # Tcl commands:
  66. MANN_INSTALL_DIR =    $(MAN_INSTALL_DIR)/mann
  67.  
  68. # To change the compiler switches, for example to change from -O
  69. # to -g, change the following line:
  70. CFLAGS = -O
  71.  
  72. # To disable ANSI-C procedure prototypes reverse the comment characters
  73. # on the following lines:
  74. PROTO_FLAGS =
  75. #PROTO_FLAGS = -DNO_PROTOTYPE
  76.  
  77. # Mathematical functions like sin and atan2 are enabled for expressions
  78. # by default.  To disable them, reverse the comment characters on the
  79. # following pairs of lines:
  80. MATH_FLAGS =
  81. #MATH_FLAGS = -DTCL_NO_MATH
  82. MATH_LIBS = @MATH_LIBS@
  83. #MATH_LIBS =
  84.  
  85. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  86. # commands are available), reverse the comment characters on the
  87. # following pairs of lines.  In addition, you'll have to provide your
  88. # own replacement for the "panic" procedure (see panic.c for what
  89. # the current one does).
  90. GENERIC_FLAGS =
  91. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  92. UNIX_OBJS = panic.o tclEnv.o tclGlob.o tclMain.o tclMtherr.o \
  93.     tclUnixAZ.o tclUnixStr.o tclUnixUtil.o
  94. #UNIX_OBJS =
  95.  
  96. # To enable memory debugging reverse the comment characters on the following
  97. # lines.  Warning:  if you enable memory debugging, you must do it
  98. # *everywhere*, including all the code that calls Tcl, and you must use
  99. # ckalloc and ckfree everywhere instead of malloc and free.
  100. MEM_DEBUG_FLAGS =
  101. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  102.  
  103. # Some versions of make, like SGI's, use the following variable to
  104. # determine which shell to use for executing commands:
  105. SHELL =        /bin/sh
  106.  
  107. # Tcl used to let the configure script choose which program to use
  108. # for installing, but there are just too many different versions of
  109. # "install" around;  better to use the install-sh script that comes
  110. # with the distribution, which is slower but guaranteed to work.
  111.  
  112. INSTALL = @srcdir@/install-sh -c
  113.  
  114. #----------------------------------------------------------------
  115. # The information below is modified by the configure script when
  116. # Makefile is generated from Makefile.in.  You shouldn't normally
  117. # modify any of this stuff by hand.
  118. #----------------------------------------------------------------
  119.  
  120. COMPAT_OBJS =        @LIBOBJS@
  121. AC_FLAGS =        @DEFS@
  122. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  123. INSTALL_DATA =        @INSTALL_DATA@
  124. RANLIB =        @RANLIB@
  125. SRC_DIR =        @srcdir@
  126. VPATH =            @srcdir@
  127.  
  128. #----------------------------------------------------------------
  129. # The information below should be usable as is.  The configure
  130. # script won't modify it and you shouldn't need to modify it
  131. # either.
  132. #----------------------------------------------------------------
  133.  
  134.  
  135. CC =        @CC@
  136. CC_SWITCHES =    ${CFLAGS} -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
  137. ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  138. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  139.  
  140. GENERIC_OBJS =    regexp.o tclAsync.o tclBasic.o tclCkalloc.o \
  141.     tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o \
  142.     tclHash.o tclHistory.o tclLink.o tclParse.o tclProc.o \
  143.     tclUtil.o tclVar.o
  144.  
  145. OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  146.  
  147. SRCS= regexp.c tclAsync.c tclBasic.c tclCkalloc.c \
  148.     tclCmdAH.c tclCmdIL.c tclCmdMZ.c tclExpr.c tclGet.c \
  149.     tclHash.c tclHistory.c tclLink.c tclParse.c tclProc.c \
  150.     tclUtil.c tclVar.c panic.c tclEnv.c tclGlob.c tclMain.c \
  151.     tclMtherr.c tclUnixAZ.c tclUnixStr.c tclUnixUtil.c \
  152.     tclTest.c tclAppInit.c
  153.  
  154. all: libtcl.a tclsh
  155.  
  156. libtcl.a: ${OBJS}
  157.     rm -f libtcl.a
  158.     ar cr libtcl.a ${OBJS}
  159.     $(RANLIB) libtcl.a
  160.  
  161. tclsh: tclAppInit.o libtcl.a
  162.     ${CC} ${CC_SWITCHES} tclAppInit.o libtcl.a ${MATH_LIBS} -o tclsh
  163.  
  164. tcltest: tclTest.o libtcl.a
  165.     ${CC} ${CC_SWITCHES} tclTest.o libtcl.a ${MATH_LIBS} -o tcltest
  166.  
  167. test: tcltest
  168.     @cwd=`pwd`; \
  169.     cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  170.     cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest
  171.  
  172. configInfo: Makefile
  173.     @rm -f configInfo
  174.     @echo "# Definitions and libraries needed to build Tcl applications" >> configInfo
  175.     @echo "# (generated by the configure script):" >> configInfo
  176.     @echo "TCL_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
  177.     @echo "TCL_LIBS = ${MATH_LIBS} @LIBS@" >> configInfo
  178.  
  179. install: install-binaries install-libraries install-man
  180.  
  181. install-binaries: libtcl.a tclsh
  182.     @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
  183.         do \
  184.         if [ ! -d $$i ] ; then \
  185.         echo "Making directory $$i"; \
  186.         mkdir $$i; \
  187.         chmod 755 $$i; \
  188.         else true; \
  189.         fi; \
  190.         done;
  191.     @echo "Installing libtcl.a"
  192.     @$(INSTALL_DATA) libtcl.a $(LIB_INSTALL_DIR)/libtcl$(VERSION).a
  193.     @$(RANLIB) $(LIB_INSTALL_DIR)/libtcl$(VERSION).a
  194.     @echo "Installing tclsh"
  195.     @$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)
  196.  
  197. install-libraries:
  198.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
  199.         $(SCRIPT_INSTALL_DIR) ; \
  200.         do \
  201.         if [ ! -d $$i ] ; then \
  202.         echo "Making directory $$i"; \
  203.         mkdir $$i; \
  204.         chmod 755 $$i; \
  205.         else true; \
  206.         fi; \
  207.         done;
  208.     @echo "Installing tcl.h"
  209.     @$(INSTALL_DATA) $(SRC_DIR)/tcl.h $(INCLUDE_INSTALL_DIR)
  210.     @for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/tclAppInit.c; \
  211.         do \
  212.         echo "Installing $$i"; \
  213.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
  214.         done;
  215.  
  216. install-man:
  217.     @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
  218.         do \
  219.         if [ ! -d $$i ] ; then \
  220.         echo "Making directory $$i"; \
  221.         mkdir $$i; \
  222.         chmod 755 $$i; \
  223.         else true; \
  224.         fi; \
  225.         done;
  226.     @cd $(SRC_DIR)/doc; for i in *.1; \
  227.         do \
  228.         echo "Installing doc/$$i"; \
  229.         rm -f $(MAN1_INSTALL_DIR)/$$i; \
  230.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  231.             $$i > $(MAN1_INSTALL_DIR)/$$i; \
  232.         chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
  233.         done;
  234.     @cd $(SRC_DIR)/doc; for i in *.3; \
  235.         do \
  236.         echo "Installing doc/$$i"; \
  237.         rm -f $(MAN3_INSTALL_DIR)/$$i; \
  238.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  239.             $$i > $(MAN3_INSTALL_DIR)/$$i; \
  240.         chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
  241.         done;
  242.     @cd $(SRC_DIR)/doc; for i in *.n; \
  243.         do \
  244.         echo "Installing doc/$$i"; \
  245.         rm -f $(MANN_INSTALL_DIR)/$$i; \
  246.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  247.             $$i > $(MANN_INSTALL_DIR)/$$i; \
  248.         chmod 444 $(MANN_INSTALL_DIR)/$$i; \
  249.         done;
  250.  
  251. Makefile: $(SRC_DIR)/Makefile.in
  252.     $(SHELL) config.status
  253.  
  254. clean:
  255.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest \
  256.         config.info
  257.  
  258. distclean: clean
  259.     rm -f Makefile config.status config.cache
  260.  
  261. depend:
  262.     makedepend -- $(CC_SWITCHES) -- $(SRCS)
  263.  
  264. fixstrtod.o: $(SRC_DIR)/compat/fixstrtod.c
  265.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/fixstrtod.c
  266.  
  267. getcwd.o: $(SRC_DIR)/compat/getcwd.c
  268.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c
  269.  
  270. opendir.o: $(SRC_DIR)/compat/opendir.c
  271.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c
  272.  
  273. strerror.o: $(SRC_DIR)/compat/strerror.c
  274.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c
  275.  
  276. strncasecmp.o: $(SRC_DIR)/compat/strncasecmp.c
  277.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strncasecmp.c
  278.  
  279. strstr.o: $(SRC_DIR)/compat/strstr.c
  280.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c
  281.  
  282. strtod.o: $(SRC_DIR)/compat/strtod.c
  283.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c
  284.  
  285. strtol.o: $(SRC_DIR)/compat/strtol.c
  286.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c
  287.  
  288. strtoul.o: $(SRC_DIR)/compat/strtoul.c
  289.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c
  290.  
  291. tmpnam.o: $(SRC_DIR)/compat/tmpnam.c
  292.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c
  293.  
  294. waitpid.o: $(SRC_DIR)/compat/waitpid.c
  295.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c
  296.  
  297. .c.o:
  298.     $(CC) -c $(CC_SWITCHES) $<
  299.  
  300. #
  301. # Target to check for proper usage of UCHAR macro.
  302. #
  303.  
  304. checkuchar:
  305.     -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit $(SRCS) | grep -v UCHAR
  306.  
  307. #
  308. # Target to make sure that only symbols with "Tcl" prefixes are
  309. # exported.
  310. #
  311.  
  312. checkexports: libtcl.a
  313.     -nm -p libtcl.a | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]cl'
  314.  
  315. #
  316. # Target to create a proper Tcl distribution from information in the
  317. # master source directory.  DISTDIR must be defined to indicate where
  318. # to put the distribution.
  319. #
  320.  
  321. configure: configure.in
  322.     autoconf
  323. dist: configure
  324.     rm -rf $(DISTDIR)
  325.     mkdir $(DISTDIR)
  326.     cp Makefile.in $(DISTDIR)
  327.     chmod 664 $(DISTDIR)/Makefile.in
  328.     cp -p $(SRCS) $(DISTDIR)
  329.     cp -p tclRegexp.h tcl.h tclInt.h tclPort.h patchlevel.h $(DISTDIR)
  330.     cp configure configure.in $(DISTDIR)
  331.     chmod 775 $(DISTDIR)/configure $(DISTDIR)/configure.in
  332.     cp -p changes README porting.notes porting.old license.terms \
  333.         install-sh $(DISTDIR)
  334.     chmod +x $(DISTDIR)/install-sh
  335.     mkdir $(DISTDIR)/library
  336.     cp -p license.terms library/*.tcl library/tclIndex $(DISTDIR)/library
  337.     mkdir $(DISTDIR)/doc
  338.     cp -p license.terms doc/*.[13n] doc/man.macros $(DISTDIR)/doc
  339.     mkdir $(DISTDIR)/compat
  340.     cp -p license.terms compat/*.c compat/*.h compat/README \
  341.         $(DISTDIR)/compat
  342.     mkdir $(DISTDIR)/tests
  343.     cp -p license.terms $(DISTDIR)/tests
  344.     cp -p tests/*.test tests/README tests/all tests/defs $(DISTDIR)/tests
  345.  
  346. # DO NOT DELETE THIS LINE -- make depend depends on it.
  347.